package com.lc.stock.module.filtrate.filter.impl;

import com.lc.stock.module.filtrate.filter.FiltrateStockFilter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author lichen
 * @description 企业近n季度净利润为正
 * @menu
 * @date 2023/2/6 15:11
 */
@Slf4j
@Component
public class RetainedProfitsFilter implements FiltrateStockFilter {

    @Value("${coustomfilter.retainedProfits}")
    private int retainedProfits;

    @Override
    public boolean doFilter(String stockCode) {
        //麦蕊接口API暂时不能用
        return true;
    }

    @Override
    public String getErrorMsg() {
        return "公司近" + retainedProfits + "季度净利润为负";
    }
}
